<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

return array(
				'controllers' => array(
						'invokables' => array(
								'Events\Controller\Index' => 'Events\Controller\IndexController',
						        'Events\Controller\PendingEvent' => 'Events\Controller\PendingEventController',
						        'Events\Controller\CompletedEvent' => 'Events\Controller\CompletedEventController',
						        'Events\Controller\EventParticipant' => 'Events\Controller\EventParticipantController'
						),
				),
		
				// The following section is new and should be added to your file
				'router' => array(
						'routes' => array(
								'events' => array(
										'type'    => 'segment',
										'options' => array(
												'route'    => '/events[/:controller][/:action][/:id][/:param]',
												'constraints' => array(
														'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
												        'id'     => '[0-9]+'												    
												),
												'defaults' => array(
														'__NAMESPACE__'=>'Events\Controller',
														'controller' => 'index',
														'action'     => 'index',
												),
											
										),
								        'may_terminate' => true,
    								    'child_routes' => array(
    								        'EventParticipant' => array(
    								            'type' => 'Literal',
    								            'options' => array(
    								                'route' => '/Index[/:id]',
    								            ),
    								        ),
    								    ),
						),
				),
			),	    
		
		
    'service_manager' => array(
        'abstract_factories' => array(
            'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
            'Zend\Log\LoggerAbstractServiceFactory',
        ),
        'aliases' => array(
            'translator' => 'MvcTranslator',
        ),
    ),
    'translator' => array(
        'locale' => 'en_US',
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),
        ),
    ),
      'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions'       => true,
        'doctype'                  => 'HTML5',
        'not_found_template'       => 'error/404',
        'exception_template'       => 'error/index',
        'template_map' => array(
            //'layout/layout'           => __DIR__ . '/../view/layout/eventslayout.phtml',
        	//'layout/layout'           => __DIR__ . '/../GLS/view/layout/layout.phtml',
            'Events/index/index' => __DIR__ . '/../view/Events/index/index.phtml',
            'error/404'               => __DIR__ . '/../view/error/404.phtml',
            'error/index'             => __DIR__ . '/../view/error/index.phtml',
        ),
        'template_path_stack' => array(
           'events'=> __DIR__ . '/../view',
        ),
    ),
    // Placeholder for console routes
    'console' => array(
        'router' => array(
            'routes' => array(
            ),
        ),
    ),
);
